package com.lwc.mq;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class Consumer {

    @RabbitListener(queues = "queue-error")
    public  void handlerError(Message message){
        System.out.println("错误日志"+new String(message.getBody()));
    }


    @RabbitListener(queues = "queue-msg")
    public  void MsgError(Message message){
        System.out.println("信息日志"+new String(message.getBody()));
    }


    @RabbitListener(queues = "order-queue")
    public  void orderrError(Message message){
        System.out.println("订单日志"+new String(message.getBody()));
    }

}
